package jp.co.systemi.asp.workflow.data;

import java.io.Serializable;
import java.util.Date;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.CreationDate;
import org.slim3.datastore.CreationUser;
import org.slim3.datastore.Model;
import org.slim3.datastore.ModificationDate;
import org.slim3.datastore.ModificationUser;

import com.google.appengine.api.datastore.Key;

@Model
public class Group implements Serializable{
    private static final long serialVersionUID = -5708703356669784659L;
    @Attribute(primaryKey = true)
    private Key id;
    private String name;
    private String notes;
    private String parentGroup;
    private String code;
    private Integer seq;
    private Date startDate;		// 組織の設立日
    private Date dissolveDate; 	// 組織の解散日（予定日
    @Attribute(listener = CreationDate.class)
    private Date regDate = null;
    @Attribute(listener = CreationUser.class)
    private com.google.appengine.api.users.User regUser;
    @Attribute(listener = ModificationDate.class)
    private Date updDate = null;
    @Attribute(listener = ModificationUser.class)
    private com.google.appengine.api.users.User updUser;

    // 保存しない項目
    @Attribute(persistent = false)
    private String parentGroupName;
    @Attribute(persistent = false)
    private String manager;				//マネージャーログインID
    @Attribute(persistent = false)
    private String managerName;			//マネージャー氏名

    public com.google.appengine.api.users.User getRegUser() {
        return regUser;
    }

    public void setRegUser(com.google.appengine.api.users.User user) {
        this.regUser = user;
    }

    public void setUpdUser(com.google.appengine.api.users.User updUser) {
        this.updUser = updUser;
    }

    public com.google.appengine.api.users.User getUpdUser() {
        return updUser;
    }
    public Key getId() {
        return id;
    }

    public void setId(Key id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getRegDate() {
        return regDate;
    }

    public void setRegDate(Date regDate) {
        this.regDate = regDate;
    }

    public Date getUpdDate() {
        return updDate;
    }

    public void setUpdDate(Date updDate) {
        this.updDate = updDate;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getNotes() {
        return notes;
    }

    public String getParentGroup() {
        return parentGroup;
    }

    public void setParentGroup(String parentGroup) {
        this.parentGroup = parentGroup;
    }

    public String toString(){
        return name;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getDissolveDate() {
        return dissolveDate;
    }

    public void setDissolveDate(Date dissolveDate) {
        this.dissolveDate = dissolveDate;
    }

    public String getParentGroupName() {
        return parentGroupName;
    }

    public void setParentGroupName(String parentGroupName) {
        this.parentGroupName = parentGroupName;
    }
    public String getManager() {
        return manager;
    }
    public void setManager(String manager) {
        this.manager = manager;
    }
    public String getManagerName() {
        return managerName;
    }
    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }
}
